package com.example.mytayunapi.Mapper;

import com.example.mytayunapi.Entity.CommentsInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface CommentsMapper {
    @Insert("insert into Comments(`CommentID`, `AuthorName`, `AuthorAvatar`, `CommentContent`) VALUES (#{CommentID},#{AuthorName},#{AuthorAvatar} ,#{CommentContent})")
    Integer insterComments(CommentsInfo commentsInfo);

    @Select("select * from comments where CommentID=#{CommentID}")
    List<CommentsInfo> getCommentsInfoByCommentID(String CommentID);

}
